﻿@inject DataService data
    <div class="row-fluid">
        @if (!ray.UsersPrismed.Contains(data.CurrentUser.Name))
        {
            <button class="btn btn-outline-secondary col-1" @onclick="(() => data.PrismRay(ray.RayId))">
                <span class="oi oi-rss"></span>@ray.PrismCount
            </button>
        }
        else
        {
            <button class="btn btn-outline-success col-1" @onclick="(() => data.UnPrismRay(ray.RayId))">
                <span class="oi oi-rss"></span>@ray.PrismCount
            </button>
        }
        <span class="card-text col-9">"@ray.Text"</span>
    </div>
    <div class="row-fluid">
        <p class="col-2 float-right"><i>- @ray.UserName</i></p>
    </div>
@code{
    [Parameter]
    public Beam.Shared.Ray ray { get; set; }
}
